<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="Veterinaria.modelo.Articulo"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.22.custom.css" rel="Stylesheet" />	
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>

<title>Reporte de Art&iacute;culos - petVida - Veterinaria</title>
<style type="text/css">
<!--
.Estilo1 {	font-family: Tahoma;
	font-weight: bold;
	font-size: 18px;
}
.Estilo4 {font-family: Tahoma; font-weight: bold; font-size: 12px; }
.Estilo5 {font-family: Tahoma;  font-size: 10px;}
-->
</style>


</head>

<body>
<table width="1124" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><p align="left"><img src="img/logo3.jpg" alt="s" width="472" height="185" /></p></td>
    <td><p>&nbsp;</p>
        <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p align="right" class="Estilo1">Reporte de Art&iacute;culos</p></td>
  </tr>
  <tr bgcolor="#CCCCCC">
    <td height="10" colspan="2"><div align="right"></div></td>
  </tr>
</table>
<%@include file="navegador.jsp" %> 
<form name="form1" method="post" action="ReporteArticuloServlet">
      <table width="200" border="0" align="center">
        <tr class="Estilo4">
          <td><div align="center">idArt&iacute;culo</div></td>
          <td><div align="center">Detalle</div></td>
          <td><div align="center">Estado</div></td>
        </tr>
        <tr>
          <td><label>
            <input name="txtId" type="text" id="txtId" />
          </label></td>
          <td><label>
            <input name="txtDetalle" type="text" id="txtDetalle" />
          </label></td>
          <td><label>
            <select name="select">
			  <option></option>
              <option value="1">Activo</option>
              <option value="0">Desactivo</option>
            </select>
          </label></td>
        </tr>
        <tr>
          <td colspan="3">&nbsp;</td>
        </tr>
        <tr>
          <td colspan="3"><label>
            <div align="center">
              <input type="submit" name="Submit" value="Buscar" />
              </div>
          </label></td>
        </tr>
      </table>
        </form>
    <p>&nbsp;</p>
    <table width="872" border="0" align="center">    
        <tr >
        	<td><table width="604" border="0" align="center">
          	<tr bgcolor="#CCCCCC" class="Estilo4">
            	<td width="99"><div align="center">idArt&iacute;culo</div></td>
              	<td width="172"><div align="center">Detalle de Art&iacute;culo </div></td>
              	<td width="152"> <div align="center">Unidad de Medida</div></td>
              	<td width="96"><div align="center">Precio</div></td>
              	<td width="63"><div align="center">Estado</div></td>
            </tr>
            <%@page import="java.util.*, Veterinaria.modelo.Articulo" %>
			<%
			Collection<Articulo> arreglo = (ArrayList<Articulo>)request.getAttribute("articulos");
			if(arreglo != null) { 
			int i = 1;
			for(Articulo x : arreglo) {
			%>  
			  <tr class="Estilo5">
			    <td ><div align="center" >
			      <% out.print(x.getCod_articulo()); %>
			      </div></td>
			    <td><% out.print(x.getDescripcion()); %></td>
			    <td><div align="center" ><% out.print(x.getUni_med()); %></div></td>
			    <td><div align="right" ><% out.print(x.getPrecio()); %></div></td>
			    <% String estado;
			    if( x.getEstado().toString().equals("1") ){
			    	estado = "Activo";
			    }
			    else{
			    	estado = "Desactivo";	
			    }
			    %>
			    <td colspan="2"><div align="center" ><% out.print(estado); %></div></td>			       
		      </tr>
			<% }  
			  } %>	  
          	</table></td>
        </tr>
     </table>
     <p>&nbsp;</p>
     
    <label></label></td>
  </tr>
  
  <tr bgcolor="#CCCCCC">
    <td colspan="2" bgcolor="#CCCCCC"><div align="center"><span class="Estilo4">Desarrollado por Grupo ThunderBolt<img src="img/Rayo.png" alt="s" width="28" height="21" /></span> </div></td>
  </tr>
</table>
<p></p>
</body>
</html>